<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
		/*转换为String*/
			var a=13;
			console.log(a);
			a=a.toString();
			console.log(a);
			a=null;
			a=String(a);
			console.log(a);
			console.log(typeof a);
		/*转换为Number*/
			var b="134";
			b=Number(b);
			console.log(b);
			console.log(typeof b);
			b=true;
			b=Number(b);
			console.log(b);
			b=undefined;
			b=Number(b);
			console.log(b);
			b="132px";
			b=parseInt(b);
			console.log(b);
		/*转换为boolean*/
			var c;
			c=0;
			c=Boolean(c);
			console.log(c);
			c=NaN;
			c=Boolean(c);
			console.log(c);
			c="";
			c=Boolean(c);
			console.log(c);
			c=null;
			c=Boolean(c);
			console.log(c);
			c=undefined;
			c=Boolean(c);
			console.log(c);/*其他为ture*/
			
		</script>
	</head>
	<body>
		
	</body>
</html>
